{% extends "default.html" %}

{% load i18n %}
{% load jalali_view %}

{% block title %} {% trans "Ad Orders List" %}{% endblock %}

{% block page_content %}
<h3>{% trans "Payment" %} - {{ order.ad.title }}</h3>

<h5>{% trans "Publish Start Date" %}</h5>
<span>{% jalali_view order.ad.start_date %}</span>

<h5>{% trans "Publish End Date" %}</h5>
<span>{% jalali_view order.ad.end_date %}</span>

<h5>{% trans "Advertizer" %}</h5>
<p>{{ order.ad.advertizer }}</p>

<h5>{% trans "Amount" %}</h5>
<p>{{ order.amount }}</p>

{% if payable %}
<h5>{% trans "Balance" %}</h5>
<p>{{ credit }}</p>
<form action="/ads/orders/pay/" method="post">
{% csrf_token %}
<input type="hidden" name="id" value="{{ order.id }}" />
<input type="submit" value='{% trans "Approve" %}' />
</form>
{% endif %}

{% if freepolicy %}
<p style="color:red;">{% trans "You are using free ad payment policy" %}</p>
{% endif %}

{% if not payable %}
<h5>{% trans "Balance" %}</h5>
<p style="color:red;">{{ credit }}</p>
{% endif %}

{% endblock page_content %}
